package poc.server;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zhangleilei on 2018/10/11.
 */
public class Server {
    private static Server instance;
    public static Server getInstance(){
        if (instance ==null){
            instance=new Server();
        }
        return instance;
    }

    private  Map<String,String> paragraphDic;
    private  Map<String,String> phaseDic;
    public Server(){
        initMap();
    }

    private  void initMap(){
        paragraphDic=new HashMap<String, String>();
        paragraphDic.put("我们理解，北京费森尤斯卡比医药有限公司（以下简称“贵司”或“北京费森”）拟与华瑞制药有限公司（以下简称“华瑞制药”）进行吸收合并，其中考虑的一种合并方案是，吸收合并完成后，华瑞制药将为存续方，贵司因被吸收合并而解散注销，同时华瑞制药将在贵司所在地新设一家分公司（以下简称“北京新设分公司”）承继贵司的人员、资产及业务（以下简称“合并交易”）。应贵司的要求，我们现将本合并交易的主要步骤、审批要求及可能涉及的重点问题初步梳理并总结如下，供贵司参考。"
                ,"we understand, Beijing Fei Senyou Scarborough ratio pharmaceutical Co., Ltd. (hereinafter referred to as\"yourcompany\"or\"BeijingFaison\")intends to Huarui pharmaceutical Co., Ltd. (hereinafter referred to as\"Huaruipharmaceutical\")were merged, one of which is to consider the merger proposal, the absorption after the completion of the merger, Huarui pharmaceutical for the existence of parties, because your company is merger and dissolution of the write-off, while Huarui pharmaceutical will set up a branch in the new seat of your company (hereinafter referred to as\"newBeijingBranch\")Cheng Jigui Division personnel, assets and business (hereinafter referred to as the\"merger\").Should your company's requirements, we are now the main steps of the merger transaction, approval requirements and key issues may be involved in the preliminary carding and summarized below, for your company reference.");
        paragraphDic.put("合并交易拟议交易架构","The proposed merger transactionarchitecture");
        paragraphDic.put("交易双方的基本情况","transaction basicof both parties");
        paragraphDic.put("合并交易审批备案环节的顺序及具体提交文件可能有所变化。我们对交易审批步骤的总结体现了近期外商投资管理体系由审批转为备案管理的改革，但鉴于2016年10月8日发布的《外商投资企业设立及变更备案管理暂行办法》（以下简称“外资备案暂行办法”）的实施时间较短，商务部门尚未颁布详细的操作指南，工商行政管理部门亦尚未制定配套措施，故某些审批备案环节的顺序、所需时间及申请文件可能需在相关政府机构出台明确的操作指南后方可确定。"
                ,"merger approval order and record aspects of specific submissions mayvary.We summarize the transaction approval step reflects the recent approval by the foreign investment management system into the record management reforms, but in view of the October 8, 2016 release of \"foreign-invested enterprises to set up and change the record Interim Measures\" (hereinafter referred to as\"foreigninvestment record Interim measures\") shorter implementation time, the business sector has yet to enact detailed operational guidelines, industry and commerce administration departments have yet to work out supporting measures, so some aspects of the order of approval of the record, and the time required for application documents may be required in the relevant government required to identify bodies after the introduction of clear operational guidelines.");
        paragraphDic.put("致：   苑静" ,"To:   Yuan Jing");
        paragraphDic.put("页数：共18页","number pages:of 18");
        paragraphDic.put("日期：2016年12月2日","Date:December 2, 2016");
        paragraphDic.put("案号：16CF0755  ","casenumber:16CF0755");
        paragraphDic.put("关于：华瑞制药有限公司吸收合并北京费森尤斯卡比医药有限公司交易所涉主要步骤及相关问题","on:Huarui pharmaceutical Co., Ltd. merged with Beijing Fresenius Kabi pharmaceutical Co., Ltd. The main steps involved in the transaction and related issues");
        paragraphDic.put("上海 Shanghai·北京 Beijing·深圳 Shenzhen·香港 Hong Kong","Shanghai Shanghai  Beijing Beijing  Shenzhen Shenzhen  Hong Kong  Kong http://www.fangdalaw.com");
        paragraphDic.put("http://www.fangdalaw.com","http://www.fangdalaw.com");
        paragraphDic.put("       法律总监","Legal Director");
        paragraphDic.put("北京费森尤斯卡比医药有限公司","Beijing Fresenius Kabi Pharmaceutical Co., Ltd.");
        paragraphDic.put("自： 方达律师事务所","since:Fangda Partners");
        paragraphDic.put("合并交易所需的主要步骤与审批","The main steps required for approvalmerger");
        paragraphDic.put("根据我们的初步研究，完成合并交易可按照本第2部分（合并交易所需的主要步骤与审批）所述以下步骤依次进行，但下文另有明确说明的除外。#1#结合初步法律研究及咨询结果，我们理解在合并协议签署后，按照本第2部分其他步骤完成合并交易可能需要1年左右的时间，且考虑到债权人异议（如有）、北京费森税务清缴、药品证照等重新申请环节中具体流程及审查时限存在诸多不确定性，实践中所需的时间可能会有较大变化。合并交易所需的主要步骤流程图详见附录一。"
                ,"Except according to our preliminary studies, the merger may be completed sequentially in accordance with the steps of Part 2 (major steps required merger and approval), but otherwise expressly stated below .#1#Combined with the results of preliminary legal research and consultation, we understand that after the signing of the merger agreement, in accordance with Part 2 of this additional steps to complete the merger transaction may take about a year, and taking into account the creditors' objections (if any), Beijing Faison tax paid to date , medicines and other re-apply for licenses there are many uncertainties in specific aspects of the review process and time frame, the time required to practice may vary considerably. The main steps required to merger flowchartin AppendixI.");
        paragraphDic.put("通过对合并交易步骤、流程的梳理并根据我们的相关法律研究和匿名电话咨询的结果，我们理解除前述交易时间方面的不确定性外，本次合并交易可能涉及的其他主要风险如下所列，还请贵司予以关注和考虑："
                ,"Through the merger transaction steps, carding process and the results of our study relevant laws and anonymous phone counseling, in addition to our understanding of uncertainty in terms of time preceding the transaction, other major risks of the merger transaction may involve listed below, Please also be concerned about your company and consider:");
        paragraphDic.put("    合并交易所需主要步骤流程图","    merger transaction requiredmajor step in the flowchart");
        paragraphDic.put("根据贵司提供的介绍及我们在企业信用信息系统上的查询结果，作为合并交易后被吸收方的北京费森系一家注册于北京市朝阳区的外商合资企业，投资总额为2998万美元，注册资本为2060万美元。北京费森有两名股东：(1)费森尤斯卡比股份公司（Fresenius Kabi AG，以下简称“FKAG”），持有北京费森65%的股权，与(2)费森尤斯卡比（中国）投资有限公司#0#（为FKAG的全资子公司，以下简称“FKC”），持有北京费森35%的股权。在与贵司此前的沟通中，我们了解到北京费森拟于今年年内将生产经营场所及注册地址由北京市朝阳区搬迁至北京市大兴区。"
                ,"according to introduce your company to provide and our results in the corporate credit information system, Beijing Faison line as a party after the merger to absorb foreign company registered in the Chaoyang District of Beijing joint venture enterprises, a total investment of 29.98 million US dollars and registered capital of $ 20.6 million. Beijing Faison has two shareholders: (1) Fresenius Kabi AG (Fresenius Kabi AG, hereinafter referred to as\"FKAG\"),holds a 65% stake in Beijing Faison, and (2)ratio (China) investment Co., Ltd.#0#(a wholly owned subsidiary of FKAG, hereinafter referred to as\"FKC\"),holds a 35% stake in Beijing Faison. In previous communications with your company, we learned that Beijing intends to Faison this year the production establishments and registered address moved from Chaoyang District, Beijing Daxing District of Beijing.");
        paragraphDic.put("当前（合并交易完成前）双方的股权结构图如下图所示：","(Before the merger is completed) the current shareholding structure of both:");
        paragraphDic.put("	通过对合并交易步骤、流程的梳理并根据我们的相关法律研究和匿名电话咨询的结果，我们理解除前述交易时间方面的不确定性外，本次合并交易可能涉及的其他主要风险如下所列，还请贵司予以关注和考虑："
                ,"	Through the merger transaction steps, carding process and the results of our study relevant laws and anonymous phone counseling, in addition to our understanding of uncertainty in terms of time preceding the transaction, other major risks of the merger transaction may involve listed below, Please also be concerned about your company and consider:");
        paragraphDic.put(" FKC，作为外商投资性公司，在外商投资管理方面视为外资公司。"," FKC, as a foreign-invested investment company, is deemed as a foreign investor for the purpose of foreign investment administration.");
        paragraphDic.put(" 本第2部分所列步骤系基于法律法规的要求做出。商业上如何安排该等步骤（例如如何确定合并交易交割的时间点或确定交割前与交割后义务）有待双方进一步讨论协商。","The steps set forth in this Section 2 are based on the applicable regulations and as to how to structure such steps from the commercial perspective should be further discussed by the parties, such as the parties' agreements on the closing and pre-closing and post-closing covenants.");
        paragraphDic.put("境外","Offshore");
        paragraphDic.put("境内","Onshore");
        paragraphDic.put("国药集团","Sinopharm Group");
        paragraphDic.put("国药资管中心","Sinopharm AMC");
        paragraphDic.put("FKAG","FKAG");
        paragraphDic.put("FKC","FKC");
        paragraphDic.put("医药工业","CNPIC");
        paragraphDic.put("华瑞制药","SSPC");
        paragraphDic.put("北京费森","BFKP");
        paragraphDic.put("分公司","branch");
        paragraphDic.put("新兴药业","SSPC Wuxi Branch");
        paragraphDic.put("华瑞临床营养研究院","SSPC Beijing Branch");
        paragraphDic.put("华瑞制药北京分公司","SSPC Shanghai Branch");
        paragraphDic.put("北京费森与华瑞制药分别就合并相关事项作出决议1","Each of BFKP and SSPC adopts resolutions regarding the matters relating to the Merger1");
        paragraphDic.put("北京费森与华瑞制药及其它各方签署合并协议","BFKP, SSPC and other parties execute the merger agreement\n");
        paragraphDic.put("华瑞制药经营范围增项","SSPC expands its business scope");
        paragraphDic.put("北京费森与华瑞制药各自通知债权人、债务人及公告","Each of BFKP and SSPC to notify its creditors and debtors and issue public announcement");
        paragraphDic.put("华瑞制药设立北京分公司","SSPC sets up the New Beijing Branch");
        paragraphDic.put("北京费森注销药品生产经营证照","BFKP applies to cancel Pharmaceutical Production and Trade License\n");
        paragraphDic.put("通知及公告期届满","Elapse of periods of notice and public announcement\n");
        paragraphDic.put("北京费森与华瑞制药分别办理商务部门备案","BFKP and SSPC conduct filing with commerce authorities, respectively\n");
        paragraphDic.put("华瑞制药办理分公司备案","SSPC conducts filing for the New Beijing Branch\n");
        paragraphDic.put("北京费森注销（包括税务清缴）","De-registration of BFKP (including tax inspection)");
        paragraphDic.put("北京分公司申请药品生产经营证照","The New Beijing Branch applies for Pharmaceutical Production and Trade Licenses");
        paragraphDic.put("华瑞制药就合并办理工商变更登记合并完成","SSPC conducts update registration with AIC regarding the merger(Effectiveness of Merger)");
        paragraphDic.put("华瑞制药承接北京费森资产并办理相应的权属变更登记","SSPC receives assets of BFKP and conducts relevant ownership alteration registrations");
        paragraphDic.put("华瑞制药通知北京费森债权人、债务人及公告","SSPC takes over employees of BFKP");
        paragraphDic.put("华瑞制药承接北京费森员工","SSPC notifies the creditors and debtors of BFKP and issues public announcement\n");
        paragraphDic.put("华瑞制药向税务、外汇管理、海关等部门办理证照变更或登记","SSPC conducts license alterations or registrations with tax, foreign exchange, custom and other authorities\n");
        paragraphDic.put("北京中长石基信息技术股份有限公司 ","BEIJING SHIJI INFORMATION TECHNOLOGY CO., LTD.");
        paragraphDic.put("与 ","and");
        paragraphDic.put("石基（香港）有限公司","SHIJI (HONG KONG) LIMITED");
        paragraphDic.put("于[●]年[●]月[●]日签订的","Dated as of [●]");
        paragraphDic.put("目录","TABLE OF CONTENTS");
        paragraphDic.put("  页码","  Page");



        phaseDic=new HashMap<String, String>();
        phaseDic.put("贵司","yourcompany");
        phaseDic.put("北京费森","BeijingFaison");
        phaseDic.put("华瑞制药","Huaruipharmaceutical");
        phaseDic.put("北京新设分公司","newBeijingBranch");
        phaseDic.put("合并交易","merger");
        phaseDic.put("外资备案暂行办法","foreigninvestment record Interim measures");
        phaseDic.put("合并交易审批备案环节的顺序及具体提交文件可能有所变化","merger approval order and record aspects of specific submissions mayvary");
        phaseDic.put("致","To");
        phaseDic.put("：",":");
        phaseDic.put("苑静","Yuan Jing");
        phaseDic.put("上海","Shanghai");
        phaseDic.put("北京","Beijing");
        phaseDic.put("深圳","Shenzhen");
        phaseDic.put("香港","Hong Kong");
        phaseDic.put("自","since");
        phaseDic.put("附录一","AppendixI");
        phaseDic.put("FKAG","FKAG");
        phaseDic.put("FKC","FKC");
        phaseDic.put("#0#","#0#");
        phaseDic.put("限公司","Co., Ltd.");
        phaseDic.put("页数","number pages");
        phaseDic.put("日期","Date");
        phaseDic.put("案号","casenumber");
        phaseDic.put("关于","on");
        phaseDic.put("2998","2998");
        phaseDic.put("#1#","#1#");
        phaseDic.put("合并完成","Effectiveness of Merger");

    }
    public boolean needTrans(String chineseSnippet){
        return  paragraphDic.keySet().contains(chineseSnippet);
    }
    public String getParagraphEng(String chineseSnippet){
         if (needTrans(chineseSnippet)){
             return paragraphDic.get(chineseSnippet);
         }
         return chineseSnippet;
    }
    public Map<String,String> getListTransMap(List<String> c_values){
        Map<String,String> result= new HashMap<String, String>();
        for (String c_value:c_values){
            if (phaseDic.keySet().contains(c_value)){
                result.put(c_value,phaseDic.get(c_value));
            }
        }
        return result;
    }
}
